package Test.Test;

import java.util.ArrayList;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        List<? super Car> list = new ArrayList<Car>();
        list.add(new benz());
        list.add(new audi());
        list.add(new A7());
        list.add(new Car());
//        benz benz = list.get(0);
        Object obj = list.get(0);
        benz benz = (benz) obj; 
        System.out.println(benz);
    }
}
class Car{
    
}
class benz extends Car{
    
}
class audi extends Car{
    
}
class A7 extends audi{
    
}
